Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add sample component with state in RNTester #34909

Closed
wants to merge 3 commits into from

Conversation

cipolleschi
Copy link
Contributor

Summary:
This Diff introduces a Sample component in RNTester which uses the NativeState to load some images.
It is an example on how to use CustomNativeState

In this first diff, I focused on the iOS side of things. The next diff will make this work with Android.

Changelog

[iOS][Added] - Introduce sample component which work with the native state.

Reviewed By: cortinico

Differential Revision: D39884926

@facebook-github-bot facebook-github-bot added CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. p: Facebook Partner: Facebook Partner fb-exported labels Oct 9, 2022
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D39884926

@react-native-bot react-native-bot added Platform: iOS iOS applications. Type: Enhancement A new feature or enhancement of an existing feature. labels Oct 9, 2022
@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
android hermes arm64-v8a 7,753,060 +5,449
android hermes armeabi-v7a 7,155,136 +5,741
android hermes x86 8,064,823 +6,235
android hermes x86_64 8,035,522 +5,998
android jsc arm64-v8a 9,613,966 +5,448
android jsc armeabi-v7a 8,379,518 +5,750
android jsc x86 9,562,018 +6,234
android jsc x86_64 10,154,319 +5,995

Base commit: 7227bde
Branch: main

@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D39884926

cipolleschi added a commit to cipolleschi/react-native that referenced this pull request Oct 9, 2022
Summary:
Pull Request resolved: facebook#34909

This Diff introduces a Sample component in RNTester which uses the NativeState to load some images.
It is an example on how to use CustomNativeState

In this first diff, I focused on the iOS side of things. The next diff will make this work with Android.

## Changelog
[iOS][Added] - Introduce sample component which work with the native state.

Reviewed By: cortinico

Differential Revision: D39884926

fbshipit-source-id: cd8b87c4d2f250ae3ed622a817cc967e13523c82
Riccardo Cipolleschi and others added 3 commits October 9, 2022 12:10
Summary:
Pull Request resolved: facebook#34796

This diff introduces the generation of custom native states using basic types as we do with the Props.

To make it work, the custom types are already writte in the Props.h file, therefore the State.h file must import that other file to have access to the required types.

This diff adds and updates the tests for the State.

## Changelog
[General][Added] - Generate custom Native State

Differential Revision: https://internalfb.com/D39816763

fbshipit-source-id: f9ad9811a918d692b6a94766b52a9810549cdcb7
Summary:
This Diff adds supports on the CustomState generation for ImageSource and ImageRequests, to enable NativeComponents to use the ImageSource loading provided by React Native.

To achieve this, I also had to fox some errors in the imports and to introduce some functions to decorate parameters.

This diff also introduces the tests for thise additional types in both generators and parsers.

## Changelog
[General][Added] - add support for ImageSource and ImageRequest in the State.

Differential Revision: https://internalfb.com/D39884889

fbshipit-source-id: c2921db68090ca506642f874b24128015811c7d7
Summary:
Pull Request resolved: facebook#34909

This Diff introduces a Sample component in RNTester which uses the NativeState to load some images.
It is an example on how to use CustomNativeState

In this first diff, I focused on the iOS side of things. The next diff will make this work with Android.

## Changelog
[iOS][Added] - Introduce sample component which work with the native state.

Reviewed By: cortinico

Differential Revision: D39884926

fbshipit-source-id: 7e67300e689bac2c155bf84942264e2ef462e6cf
@facebook-github-bot
Copy link
Contributor

This pull request was exported from Phabricator. Differential Revision: D39884926

@analysis-bot
Copy link

Platform Engine Arch Size (bytes) Diff
ios - universal n/a --

Base commit: 7227bde
Branch: main

@react-native-bot
Copy link
Collaborator

This pull request was successfully merged by @cipolleschi in 1a9cceb.

When will my fix make it into a release? | Upcoming Releases

@react-native-bot react-native-bot added the Merged This PR has been merged. label Oct 10, 2022
OlimpiaZurek pushed a commit to OlimpiaZurek/react-native that referenced this pull request May 22, 2023
Summary:
Pull Request resolved: facebook#34909

This Diff introduces a Sample component in RNTester which uses the NativeState to load some images.
It is an example on how to use CustomNativeState

In this first diff, I focused on the iOS side of things. The next diff will make this work with Android.

## Changelog
[iOS][Added] - Introduce sample component which work with the native state.

Reviewed By: cortinico

Differential Revision: D39884926

fbshipit-source-id: 9323d751fd06a1bb8ff93af836d97010c2095833
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
CLA Signed This label is managed by the Facebook bot. Authors need to sign the CLA before a PR can be reviewed. fb-exported Merged This PR has been merged. p: Facebook Partner: Facebook Partner Platform: iOS iOS applications. Type: Enhancement A new feature or enhancement of an existing feature.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants